<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div{
				 display: none;
				/* visibility: hidden; */
			}
			.cartOver{
				display: block;
				border-radius: 50%;
				text-align: center;
				font-size: 30px;
				color: red;
				border: 2px groove green;
				height: 400px;
				width: 800px;
			}
		</style>
		<script>
			function showProd(){
				var d=document.getElementById("gouwuche");
				d.className="cartOver";
				//d.setAttribute("class","cartOver");
			}
			function hideProd(){
				var d=document.getElementById("gouwuche");
				d.removeAttribute("class");
				//d.className="";
				
			}
			function showDiv(){
				var d=document.getElementById("gouwuche");
				//只能获得行内样式
				//alert("display:"+d.style.display);
				//alert("height:"+d.style.height);
				var s=(document.defaultView.getComputedStyle(d,null)||d.currentStyle);
				alert(s.display);
				alert("height:"+s.height);4
				alert("width:"+s.width);
			}
		</script>
	</head>
	<body>
		<a href="#" onmouseover="showProd()" >购物车</a>
		<input type="button" value="获得div的属性" onclick="showDiv()"/>
		<div id="gouwuche" >
			<h3>漂亮的越南小媳妇</h3>
			<img src="images/3.jpg" height="100px" width="300px"/>
		</div>
		<h1>教育改变生活</h1>
	</body>
</html>
